<template>
  <div>
    <x-header id="header" :left-options="{backText: ''}">我的团队</x-header>
    <div class="main-header">
      <div class="superior">
        <div class="title">我的团长</div>
        <div class="name-con">
          <div class="name">王小二</div>
        </div>
      </div>
      <div class="subordinateList">
        <group class="group" title="我的团员">
          <cell class="cell" v-for="(item,index) in subordinateList" :key="index" :title="item.title" :link="`teamTeam?id=${item.id}`"  >
          </cell>
        </group>
      </div>
    </div>
  </div>
</template>

<script>
import { getTeam } from '@/api/user'
export default {
  name: 'team',
  data () {
    return {
      subordinateList: [
        {
          id:1,
          title: '张三'
        },
        {
          id:1,
          title: '李四'
        },
        {
          id:1,
          title: '是对'
        },
        {
          id:1,
          title: '狗蛋'
        }
      ]
    }
  },
  mounted () {
    console.log(this.globalData)
    getTeam(this.globalData.cid).then(data => {
      console.log(data)
    })
  }
}
</script>

<style scoped>
.superior {
  padding: 2.5rem 0;
  height: 4.42rem;
  width: 100%;
  background-image: url("../../../static/img/background.png");
  background-size: 100% 100%;
}
.name-con {
  padding-top: 0.64rem;
  display: flex;
  justify-content: center;
}
.name {
  font-size: 1.71rem;
  line-height: 2.35rem;
  color: #fff;
}
.title {
  text-align: center;
  color: #fff;
}
.subordinateList {
  margin-top: 1rem;
  background: #fff;
  overflow: auto;
}
</style>
